USE [BillManage]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[adjust](
	[rb] [nvarchar](6) NULL,
	[sq] [nvarchar](6) NULL,
	[cfhbj] [nvarchar](6) NULL,
	[cfhys] [nvarchar](6) NULL,
	[dl] [nvarchar](10) NULL,
	[fhsx] [nvarchar](6) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[Area]    Script Date: 08/31/2014 19:21:19 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Area](
	[编号] [int] NOT NULL,
	[CustomerID] [nvarchar](10) NULL,
	[MeterNo] [nvarchar](12) NULL,
	[UserName] [nvarchar](20) NULL,
	[Address] [nvarchar](50) NULL,
	[Telephone] [nvarchar](18) NULL,
	[oarea] [nvarchar](20) NULL,
	[narea] [nvarchar](20) NULL,
	[operator] [nvarchar](10) NULL,
	[petime] [datetime] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[BGIC]    Script Date: 08/31/2014 19:21:34 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[BGIC](
	[ID] [int] NOT NULL,
	[CustomerID] [nvarchar](12) NULL,
	[UserName] [nvarchar](20) NULL,
	[bgFare] [real] NULL,
	[ChangeTime] [datetime] NULL,
	[Operator] [nvarchar](8) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[czjl]    Script Date: 08/31/2014 19:21:49 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[czjl](
	[ID] [int] NOT NULL,
	[Operator] [nvarchar](50) NULL,
	[OPtime] [nvarchar](50) NULL,
	[OPtype] [nvarchar](50) NULL,
	[result] [nvarchar](50) NULL,
	[opyhh] [nvarchar](50) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[deluser]    Script Date: 08/31/2014 19:22:01 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[deluser](
	[编号] [int] NOT NULL,
	[CustomerID] [nvarchar](18) NULL,
	[UserName] [nvarchar](50) NULL,
	[ChangeTime] [datetime] NULL,
	[DelType] [nvarchar](50) NULL,
	[Operator] [nvarchar](10) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[DGNP]    Script Date: 08/31/2014 19:22:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[DGNP](
	[ID] [int] NOT NULL,
	[name] [nvarchar](50) NULL,
	[value] [nvarchar](50) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[DjCZ]    Script Date: 08/31/2014 19:22:19 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[DjCZ](
	[oldpricetype] [nvarchar](8) NULL,
	[newpricetype] [nvarchar](8) NULL,
	[oldunitprice] [nvarchar](8) NULL,
	[oldsharpprice] [nvarchar](8) NULL,
	[oldpeakprice] [nvarchar](8) NULL,
	[oldlowprice] [nvarchar](8) NULL,
	[newunitprice] [nvarchar](8) NULL,
	[newsharpprice] [nvarchar](8) NULL,
	[newpeakprice] [nvarchar](8) NULL,
	[newlowprice] [nvarchar](8) NULL,
	[operator] [nvarchar](8) NULL,
	[petime] [datetime] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[djk]    Script Date: 08/31/2014 19:22:26 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[djk](
	[CustomerID] [nvarchar](10) NULL,
	[CTime] [datetime] NULL,
	[jsr] [nvarchar](6) NULL,
	[Lasttime] [nvarchar](10) NULL,
	[lyzdn] [nvarchar](10) NULL,
	[lyjdn] [nvarchar](10) NULL,
	[lyfdn] [nvarchar](10) NULL,
	[lypdn] [nvarchar](10) NULL,
	[lygdn] [nvarchar](10) NULL,
	[LLasttime] [nvarchar](10) NULL,
	[llyzdn] [nvarchar](10) NULL,
	[llyjdn] [nvarchar](10) NULL,
	[llyfdn] [nvarchar](10) NULL,
	[llypdn] [nvarchar](10) NULL,
	[llygdn] [nvarchar](10) NULL,
	[Tamper] [nvarchar](20) NULL,
	[ljgdlglsj] [nvarchar](15) NULL,
	[ljgdlglcs] [int] NULL,
	[ljydlglsj] [nvarchar](20) NULL,
	[ljydlglcs] [int] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[djlx]    Script Date: 08/31/2014 19:22:34 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[djlx](
	[djlxid] [int] NOT NULL,
	[PriceType] [nvarchar](20) NULL,
	[UnitPrice] [nvarchar](50) NULL,
	[sharpprice] [nvarchar](50) NULL,
	[peakprice] [nvarchar](50) NULL,
	[lowprice] [nvarchar](50) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[dksj]    Script Date: 08/31/2014 19:22:45 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[dksj](
	[用户号] [nvarchar](8) NULL,
	[剩余电量] [nvarchar](50) NULL,
	[有功总电能] [nvarchar](9) NULL,
	[有功峰电能] [nvarchar](9) NULL,
	[有功谷电能] [nvarchar](9) NULL,
	[有功平电能] [nvarchar](9) NULL,
	[最大需量] [nvarchar](7) NULL,
	[累积购电次数] [nvarchar](6) NULL,
	[插卡日期] [nvarchar](50) NULL,
	[读卡日期] [datetime] NULL,
	[有功反向总电能] [nvarchar](9) NULL,
	[操作员] [nvarchar](50) NULL,
	[有功尖电能] [nvarchar](9) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[fhsx]    Script Date: 08/31/2014 19:22:51 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[fhsx](
	[fhid] [int] NOT NULL,
	[MaxLoad] [nvarchar](50) NULL,
	[bdl] [nvarchar](10) NULL,
	[lxsign] [int] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[ggjl]    Script Date: 08/31/2014 19:23:02 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ggjl](
	[编号] [int] NOT NULL,
	[用户号] [nvarchar](10) NULL,
	[新管理卡ID] [nvarchar](50) NULL,
	[新弱报电量] [nvarchar](50) NULL,
	[新强报电量] [nvarchar](50) NULL,
	[新赊欠电量] [nvarchar](50) NULL,
	[新负荷上限] [nvarchar](50) NULL,
	[新囤积电量] [nvarchar](50) NULL,
	[新超负荷延时时间] [nvarchar](50) NULL,
	[新超负荷恢复时间] [nvarchar](50) NULL,
	[新结算日] [nvarchar](50) NULL,
	[修改日期] [datetime] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[hfsj]    Script Date: 08/31/2014 19:23:42 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[hfsj](
	[hfID] [int] NOT NULL,
	[RestoreTime] [int] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[IC_glk]    Script Date: 08/31/2014 19:23:49 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[IC_glk](
	[glkid] [int] NOT NULL,
	[ManageName] [nvarchar](20) NULL,
	[Time1fl] [nvarchar](8) NULL,
	[Time2fl] [nvarchar](8) NULL,
	[Time3fl] [nvarchar](8) NULL,
	[Time4fl] [nvarchar](8) NULL,
	[Time5fl] [nvarchar](8) NULL,
	[Time6fl] [nvarchar](8) NULL,
	[Time7fl] [nvarchar](8) NULL,
	[Time8fl] [nvarchar](8) NULL,
	[Sharpxs] [nvarchar](6) NULL,
	[Peakxs] [nvarchar](6) NULL,
	[lowxs] [nvarchar](6) NULL,
	[UnitPrice] [real] NULL,
	[SharpPrice] [real] NULL,
	[PeakPrice] [real] NULL,
	[LowPrice] [real] NULL,
	[PassWord] [nvarchar](6) NULL,
	[CTime] [datetime] NULL,
	[jsr] [nvarchar](5) NULL,
	[DJLXID] [int] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[IC_HBJL]    Script Date: 08/31/2014 19:23:58 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[IC_HBJL](
	[ID] [int] NOT NULL,
	[CustomerID] [nvarchar](20) NOT NULL,
	[changeTime] [datetime] NULL,
	[ChangeFare] [float] NULL,
	[OldMeterNo] [nvarchar](20) NULL,
	[NewMeterNo] [nvarchar](20) NULL,
	[Operator] [nvarchar](8) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[IC_SDJL]    Script Date: 08/31/2014 19:24:06 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[IC_SDJL](
	[CustomerID] [nvarchar](12) NULL,
	[MeterNO] [nvarchar](10) NULL,
	[PE] [int] NULL,
	[UnitPrice] [nvarchar](5) NULL,
	[TotalCost] [nvarchar](50) NULL,
	[PETime] [datetime] NULL,
	[PETimes] [nvarchar](20) NULL,
	[RE] [nvarchar](50) NULL,
	[ME] [nvarchar](10) NULL,
	[TotalConsume] [nvarchar](50) NULL,
	[RemainSum] [nvarchar](8) NULL,
	[Password] [nvarchar](20) NULL,
	[ST] [nvarchar](10) NULL,
	[CTime] [datetime] NULL,
	[Operator] [nvarchar](10) NULL,
	[PEid] [int] NULL,
	[glsign] [nvarchar](10) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[IC_USER]    Script Date: 08/31/2014 19:24:13 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[IC_USER](
	[ID] [int] NOT NULL,
	[CustomerID] [nvarchar](10) NULL,
	[MeterNO] [nvarchar](12) NULL,
	[UserName] [nvarchar](20) NULL,
	[Address] [nvarchar](50) NULL,
	[Telephone] [nvarchar](18) NULL,
	[PETimes] [nvarchar](50) NULL,
	[Area] [nvarchar](20) NULL,
	[PETime] [datetime] NULL,
	[Rate] [nvarchar](50) NULL,
	[Password] [nvarchar](8) NULL,
	[AE] [nvarchar](50) NULL,
	[CE] [nvarchar](50) NULL,
	[MaxLoad] [nvarchar](50) NULL,
	[DelayTime] [nvarchar](50) NULL,
	[RestoreTime] [nvarchar](50) NULL,
	[MaxElectricity] [nvarchar](50) NULL,
	[jsr] [nvarchar](5) NULL,
	[ST] [nvarchar](10) NULL,
	[PhaseWire] [nvarchar](20) NULL,
	[DJLXID] [int] NULL,
	[glkid] [int] NULL,
	[qtsign] [nvarchar](2) NULL,
	[glsign] [nvarchar](2) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[IC_XHJL]    Script Date: 08/31/2014 19:24:19 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[IC_XHJL](
	[ID] [int] NOT NULL,
	[CustomerID] [nvarchar](8) NULL,
	[UserName] [nvarchar](50) NULL,
	[Address] [nvarchar](50) NULL,
	[Telephone] [nvarchar](18) NULL,
	[PETimes] [nvarchar](50) NULL,
	[Area] [nvarchar](20) NULL,
	[DelTime] [datetime] NULL,
	[Operator] [nvarchar](4) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[jsr]    Script Date: 08/31/2014 19:24:26 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[jsr](
	[jsrid] [int] NOT NULL,
	[jsr] [nvarchar](4) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[kyhsql]    Script Date: 08/31/2014 19:24:32 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[kyhsql](
	[CustomerID] [nvarchar](12) NULL,
	[UserName] [nvarchar](20) NULL,
	[Address] [nvarchar](50) NULL,
	[Telephone] [nvarchar](18) NULL,
	[MAXPE] [int] NULL,
	[LASTPETIME] [datetime] NULL,
	[TOTALPE] [float] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[ListI10]    Script Date: 08/31/2014 19:24:38 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ListI10](
	[用户号] [nvarchar](10) NULL,
	[姓名] [nvarchar](20) NULL,
	[地址] [nvarchar](50) NULL,
	[电话] [nvarchar](18) NULL,
	[区域] [nvarchar](20) NULL,
	[弱报电量] [nvarchar](50) NULL,
	[赊欠电量] [nvarchar](50) NULL,
	[超负荷延时时间] [nvarchar](50) NULL,
	[超负荷恢复时间] [nvarchar](50) NULL,
	[购电次数] [nvarchar](50) NULL,
	[单价] [nvarchar](50) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[newyh]    Script Date: 08/31/2014 19:24:44 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[newyh](
	[用户号] [nvarchar](10) NULL,
	[用户名称] [nvarchar](50) NULL,
	[表号] [nvarchar](12) NULL,
	[管理卡ID] [nvarchar](50) NULL,
	[弱报电量] [nvarchar](50) NULL,
	[强报电量] [nvarchar](50) NULL,
	[赊欠电量] [nvarchar](50) NULL,
	[负荷上限] [nvarchar](50) NULL,
	[囤积电量] [nvarchar](50) NULL,
	[超负荷延时时间] [nvarchar](50) NULL,
	[超负荷恢复时间] [nvarchar](50) NULL,
	[结算日] [nvarchar](4) NULL,
	[用户名] [nvarchar](50) NULL,
	[开户时间] [datetime] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[Price]    Script Date: 08/31/2014 19:24:50 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Price](
	[编号] [int] NOT NULL,
	[CustomerID] [nvarchar](10) NULL,
	[MeterNo] [nvarchar](12) NULL,
	[UserName] [nvarchar](20) NULL,
	[Address] [nvarchar](50) NULL,
	[Telephone] [nvarchar](18) NULL,
	[ouprice] [nvarchar](50) NULL,
	[nuprice] [nvarchar](50) NULL,
	[operator] [nvarchar](10) NULL,
	[petime] [datetime] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[qbdl]    Script Date: 08/31/2014 19:24:55 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[qbdl](
	[qbID] [int] NOT NULL,
	[qb] [int] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[QYMC]    Script Date: 08/31/2014 19:25:02 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[QYMC](
	[qyID] [int] NOT NULL,
	[Area] [nvarchar](50) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[rbdl]    Script Date: 08/31/2014 19:25:09 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[rbdl](
	[rbID] [int] NOT NULL,
	[AE] [int] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[sqdl]    Script Date: 08/31/2014 19:25:15 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[sqdl](
	[sqID] [int] NOT NULL,
	[CE] [int] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[SUPER]    Script Date: 08/31/2014 19:25:20 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[SUPER](
	[SerialNumber] [int] NULL,
	[CodeName] [nvarchar](9) NULL,
	[Operator] [nvarchar](8) NULL,
	[Password] [nvarchar](8) NULL,
	[popedom] [bit] NOT NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[tjdl]    Script Date: 08/31/2014 19:25:39 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[tjdl](
	[tjid] [int] NOT NULL,
	[MaxElectricity] [int] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[xgjl]    Script Date: 08/31/2014 19:25:47 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[xgjl](
	[编号] [int] NOT NULL,
	[用户号] [nvarchar](10) NULL,
	[新管理卡ID] [nvarchar](50) NULL,
	[新弱报电量] [nvarchar](50) NULL,
	[新强报电量] [nvarchar](50) NULL,
	[新赊欠电量] [nvarchar](50) NULL,
	[新负荷上限] [nvarchar](50) NULL,
	[新囤积电量] [nvarchar](50) NULL,
	[新超负荷延时时间] [nvarchar](50) NULL,
	[新超负荷恢复时间] [nvarchar](50) NULL,
	[新结算日] [nvarchar](50) NULL,
	[修改日期] [datetime] NULL,
	[管理卡ID] [nvarchar](50) NULL,
	[弱报电量] [nvarchar](50) NULL,
	[强报电量] [nvarchar](50) NULL,
	[赊欠电量] [nvarchar](50) NULL,
	[负荷上限] [nvarchar](50) NULL,
	[囤积电量] [nvarchar](50) NULL,
	[超负荷延时时间] [nvarchar](50) NULL,
	[结算日] [nvarchar](4) NULL,
	[用户名] [nvarchar](50) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[yhdj]    Script Date: 08/31/2014 19:25:52 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[yhdj](
	[Total_Amount] [int] NULL,
	[Preferential_Price] [nvarchar](50) NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[yssj]    Script Date: 08/31/2014 19:25:59 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[yssj](
	[ysid] [int] NOT NULL,
	[DelayTime] [int] NULL
) ON [PRIMARY]

GO

USE [BillManage]
GO

/****** Object:  Table [dbo].[ztz]    Script Date: 08/31/2014 19:26:05 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ztz](
	[编号] [int] NOT NULL,
	[用户号] [nvarchar](20) NULL,
	[继电器状态] [nvarchar](50) NULL,
	[存储器状态] [nvarchar](50) NULL,
	[时钟] [nvarchar](8) NULL,
	[电池] [nvarchar](8) NULL,
	[表状态] [nvarchar](20) NULL,
	[负电量] [nvarchar](20) NULL,
	[继电器] [nvarchar](20) NULL,
	[插卡日期] [datetime] NULL,
	[操作员] [nvarchar](10) NULL
) ON [PRIMARY]

GO

